import instance from "@/utils/request";

// 获取验证码 /api/home/getCode
export function getCode(data) {
    return instance.get(`/api/home/getCode?phoneNumber=${data}`)
}

//账号密码登录 /api/home/login
export function login(data) {
    return instance.post('/api/home/login', data)
}

//注册账号 /api/home/reg  注册接口
export function reg(data) {
    return instance.post('/api/home/reg', data)
}

//获取个人信息  /moon/my/personal
export function personal() {
    return instance.get('/moon/my/personal')
}

//忘记密码 /api/home/changePassword post
export function changePassword(data) {
    return instance.post('/api/home/changePassword', data)
}

// 退出登录 /api/home/forceLogout de
export function forceLogout() {
    return instance.delete('/api/home/forceLogout')
}
